from django.urls import path
from apps.users.views import usernamecountview, \
  MobileCountView,RegisterView,LoginView,LogoutView,\
    UserInfoView,emailview,emailVerifyView, CreateAddressView, AddressView,\
    UserBrowseHistory

urlpatterns = [
  ## 判断用户名是否重复
    path('usernames/<username_converter:username>/count/', usernamecountview.as_view()),
    path('mobiles/<mobile_converter:mobile>/count/', MobileCountView.as_view()),
    path('register/', RegisterView.as_view()),
    # 登陆
    path('login/', LoginView.as_view()),
    # 登出
    path('logout/', LogoutView.as_view()),
    ## 验证用户是否登陆
    path('info/',UserInfoView.as_view()),
    # 验证邮箱
    path('emails/',emailview.as_view()),
    # 验证邮箱
    path('emails/verification/',emailVerifyView.as_view()),
 
    # 新增地址    
    path('addresses/create/', CreateAddressView.as_view()),
    # 地址列表
    path('addresses/', AddressView.as_view()),
    ## 历史记录
    path('browse_histories/', UserBrowseHistory.as_view()),
    
    
]
